import {
 CARDID,
 CARDDETAIL,
 ENTRANCETYPE
} from "../constants/card";

const INITIAL_STATE = {
  __cardId: null,
  __cardDetail: null,
  __entranceType: null,
  
};

export default function userInfo(state = INITIAL_STATE, action) {
  switch (action.type) {
    case CARDID:
      return {
        ...state,
        __cardId: action.payload,
      };
    case CARDDETAIL:
      return {
        ...state,
        __cardDetail: action.payload,
      };
    case ENTRANCETYPE:
      return {
        ...state,
        __entranceType: action.payload,
      };

    default:
      return state;
  }
}
